package com.aipp.mall.h5.domain.dto;

import com.aipp.mall.common.anno.Note;
import com.aipp.mall.h5.domain.entity.Product;
import com.aipp.mall.h5.domain.entity.Sku;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;


/**
 * 创建订单请求VO
 *
 * @author Jinxin
 */
@Data
public class OrderProductListDTO {
    @Note(value = "商品skuId")
    @NotNull(message = "商品skuId不能为空")
    private Long skuId;

    @Note(value = "数量")
    @NotNull(message = "数量不能为空")
    @Min(value = 1, message = "数量不能小于1")
    private Integer quantity;

    @Note(value = "消费金")
    private BigDecimal consumption;

    @Note(value = "运费")
    private BigDecimal freightAmount;

    @Note(value = "隐藏 业务过程中的数据")
    private Sku sku;

    @Note(value = "隐藏 业务过程中的数据")
    private Product product;
}